Skip to content

Conversation

@sandsinh
Copy link
Contributor

@sandsinh sandsinh commented Sep 30, 2025

Add Origin Field Support to Fix API + Bug Fix

Summary

Adds support for the new origin field in Fix entities and fixes a bug where executedBy was incorrectly mapping to executedAt value in the DTO.

Changes

  • DTO: Added origin field to FixDto.toJSON() serialization
  • Bug Fix: Fixed executedBy field mapping in DTO (was incorrectly returning executedAt)
  • Tests: Added comprehensive test coverage for origin field handling
  • Mock: Updated fakeCreateFix test helper to include origin default

Details

// DTO serialization (fixed)
export const FixDto = {
  toJSON(fix) {
    return {
      // ... existing fields
      executedBy: fix.getExecutedBy(), // ✅ Fixed: was fix.getExecutedAt()
      executedAt: fix.getExecutedAt(),
      origin: fix.getOrigin(),        // ✅ New field
    };
  },
};

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description. Or if there's no issue created, make sure you
    describe here the problem you're solving.
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

If the PR is changing the API specification:

  • make sure you add a "Not implemented yet" note the endpoint description, if the implementation is not ready
    yet. Ideally, return a 501 status code with a message explaining the feature is not implemented yet.
  • make sure you add at least one example of the request and response.

If the PR is changing the API implementation or an entity exposed through the API:

  • make sure you update the API specification and the examples to reflect the changes.

If the PR is introducing a new audit type:

  • make sure you update the API specification with the type, schema of the audit result and an example

Related Issues

Thanks for contributing!

@github-actions
Copy link

This PR will trigger a patch release when merged.

@sandsinh sandsinh merged commit d89d4f0 into main Oct 17, 2025
7 checks passed
@sandsinh sandsinh deleted the SITES-35629 branch October 17, 2025 09:37
solaris007 pushed a commit that referenced this pull request Oct 17, 2025
## [1.207.2](v1.207.1...v1.207.2) (2025-10-17)

### Bug Fixes

* update data-access ([#1303](#1303)) ([d89d4f0](d89d4f0))
@solaris007
Copy link
Member

🎉 This PR is included in version 1.207.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants